package com.md.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RLock {
  String prefix() default "";

  String key() default "";

  long waitTime() default 100;

  long leaseTime() default 10;

  /**
   * 时间单位
   *
   * @return 时间单位
   */
  TimeUnit timeUnit() default TimeUnit.SECONDS;

}
